package weaver.interfaces.cetc.action.util;

import weaver.interfaces.cetc.webservice.GetPurOrdInfo;
import weaver.interfaces.cetc.webservice.GetPurOrdInfoLocator;
import weaver.interfaces.cetc.webservice.GetPurOrdInfoSoap_BindingStub;

/**
 * @Title: ecology-idea
 * @Company: 泛微软件
 * @author: weaver.Dusongsong
 * @version: 1.0
 * @CreateDate: 2021-10-28
 * @Description: 浪潮webservice接口封装类
 * @ModifyLog:
 **/

public class WebServiceUtil {
    private static GetPurOrdInfo ordInfo = new GetPurOrdInfoLocator();
    private static GetPurOrdInfoSoap_BindingStub bindingStub;
    //更新经销代理商信息
    public static String updateJxdlsInfo(String vendorCode, String jl, String score, String modifier, String mofifyTime, String vendorIdentify){
        String resutl = "";
        try {
            bindingStub = (GetPurOrdInfoSoap_BindingStub) ordInfo.getGetPurOrdInfoSoap();
            resutl =  bindingStub.updateJxdlsInfo(vendorCode,jl,score,modifier,mofifyTime,vendorIdentify);
            bindingStub._getService();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return resutl;
    }
    //更新生产商信息
    public static String updateScsInfo(String vendorCode, String jl, String score, String modifier, String modifyTime, String vendorIdentify, String level){
        String resutl = "";
        try {
            bindingStub = (GetPurOrdInfoSoap_BindingStub) ordInfo.getGetPurOrdInfoSoap();
            resutl =  bindingStub.updateScsInfo(vendorCode,jl,score,modifier,modifyTime,vendorIdentify,level);
            bindingStub._getService();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return resutl;
    }
    //更新生产商信息
    public static String updateHggf(String vendorCode, String score, String modifier, String modifyTime, String vendorIdentify){
        String resutl = "";
        try {
            bindingStub = (GetPurOrdInfoSoap_BindingStub) ordInfo.getGetPurOrdInfoSoap();
            resutl =  bindingStub.updateHggf(vendorCode,score,modifier,modifyTime,vendorIdentify);
            bindingStub._getService();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return resutl;
    }
}
